home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / djgpp / src / gas-211 / gas / makefile.in < prev    next >
Encoding:
Makefile  |  1993-05-30  |  14.3 KB  |  481 lines

  1. # Makefile for GNU Assembler
  2. #   Copyright (C) 1987-1992 Free Software Foundation, Inc.
  3.  
  4. #This file is part of GNU GAS.
  5.  
  6. #GNU GAS is free software; you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation; either version 2, or (at your option)
  9. #any later version.
  10.  
  11. #GNU GAS is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. #GNU General Public License for more details.
  15.  
  16. #You should have received a copy of the GNU General Public License
  17. #along with GNU GAS; see the file COPYING.  If not, write to
  18. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # The targets for external use include:
  21. # all, doc, proto, install, uninstall, includes, TAGS,
  22. # clean, cleanconfig, realclean, stage1, stage2, stage3, stage4.
  23.  
  24. # Variables that exist for you to override.
  25. # See below for how to change them for certain systems.
  26.  
  27. srcdir = .
  28.  
  29. prefix = /usr/local
  30.  
  31. program_transform_name =
  32. exec_prefix = $(prefix)
  33. bindir = $(exec_prefix)/bin
  34. libdir = $(exec_prefix)/lib
  35. tooldir = $(libdir)/$(target_alias)
  36.  
  37. datadir = $(prefix)/lib
  38. mandir = $(prefix)/man
  39. man1dir = $(mandir)/man1
  40. man2dir = $(mandir)/man2
  41. man3dir = $(mandir)/man3
  42. man4dir = $(mandir)/man4
  43. man5dir = $(mandir)/man5
  44. man6dir = $(mandir)/man6
  45. man7dir = $(mandir)/man7
  46. man8dir = $(mandir)/man8
  47. man9dir = $(mandir)/man9
  48. infodir = $(prefix)/info
  49. includedir = $(prefix)/include
  50. docdir = $(datadir)/doc
  51.  
  52. VERSION=2.1
  53.  
  54. SHELL = /bin/sh
  55.  
  56. INSTALL = install -c
  57. INSTALL_PROGRAM = $(INSTALL)
  58. INSTALL_DATA = $(INSTALL)
  59.  
  60. AR = ar
  61. AR_FLAGS = qv
  62. BISON = bison
  63. MAKEINFO = makeinfo
  64. TEXI2DVI = texi2dvi
  65. RANLIB = ranlib
  66. CFLAGS = -g
  67.  
  68. AS_FOR_TARGET = $${here}/as.new
  69.  
  70. CC_FOR_TARGET = ` \
  71.   if [ -f $${here}/../gcc/Makefile ] ; then \
  72.     echo $${here}/../gcc/xgcc -B$${here}/../gcc/; \
  73.   else \
  74.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  75.       echo $(CC); \
  76.     else \
  77.       t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
  78.     fi; \
  79.   fi`
  80.  
  81. NM_FOR_TARGET = ` \
  82.   if [ -f $${here}/../binutils/Makefile ] ; then \
  83.     echo $${here}/../binutils/nm ; \
  84.   else \
  85.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  86.       echo $(NM); \
  87.     else \
  88.        t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
  89.     fi; \
  90.   fi`
  91.  
  92. OBJDUMP=objdump
  93. OBJDUMP_FOR_TARGET = ` \
  94.   if [ -f $${here}/../binutils/Makefile ] ; then \
  95.     echo $${here}/../binutils/objdump ; \
  96.   else \
  97.     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
  98.       echo $(OBJDUMP); \
  99.     else \
  100.        t='$(program_transform_name)'; echo objdump | sed -e '' $$t ; \
  101.     fi; \
  102.   fi`
  103.  
  104. FLAGS_TO_PASS = \
  105.     "prefix=$(prefix)" \
  106.     "exec_prefix=$(exec_prefix)" \
  107.     "tooldir=$(tooldir)" \
  108.     "AR=$(AR)" \
  109.     "AR_FLAGS=$(AR_FLAGS)" \
  110.     "CC=$(CC)" \
  111.     "CFLAGS=$(CFLAGS)" \
  112.     "RANLIB=$(RANLIB)" \
  113.     "LOADLIBES=$(LOADLIBES)" \
  114.     "LDFLAGS=$(LDFLAGS)" \
  115.     "BISON=$(BISON)" \
  116.     "LEX=$(LEX)" \
  117.     "MAKEINFO=$(MAKEINFO)" \
  118.     "INSTALL=$(INSTALL)" \
  119.     "INSTALL_DATA=$(INSTALL_DATA)" \
  120.     "INSTALL_PROGRAM=$(INSTALL_PROGRAM)"
  121.  
  122. CHECKFLAGS= \
  123.     "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
  124.     "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
  125.     "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
  126.     "OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)"
  127.  
  128. # Lists of files for various purposes.
  129.  
  130. REAL_SOURCES = \
  131.     $(srcdir)/app.c \
  132.     $(srcdir)/as.c \
  133.     $(srcdir)/atof-generic.c \
  134.     $(srcdir)/bignum-copy.c \
  135.     $(srcdir)/cond.c \
  136.     $(srcdir)/expr.c \
  137.     $(srcdir)/flonum-konst.c \
  138.     $(srcdir)/flonum-copy.c \
  139.     $(srcdir)/flonum-mult.c \
  140.     $(srcdir)/frags.c \
  141.     $(srcdir)/hash.c \
  142.     $(srcdir)/hex-value.c \
  143.     $(srcdir)/input-file.c \
  144.     $(srcdir)/input-scrub.c \
  145.     $(srcdir)/messages.c \
  146.     $(srcdir)/output-file.c \
  147.     $(srcdir)/read.c \
  148.     $(srcdir)/subsegs.c \
  149.     $(srcdir)/symbols.c \
  150.     $(srcdir)/write.c \
  151.     $(srcdir)/listing.c \
  152.     $(srcdir)/xmalloc.c
  153.  
  154. # in an expedient order
  155. LINKED_SOURCES = \
  156.     targ-cpu.c \
  157.     obj-format.c \
  158.     atof-targ.c
  159.  
  160. SOURCES = $(LINKED_SOURCES) $(REAL_SOURCES)
  161.  
  162. REAL_HEADERS = \
  163.     $(srcdir)/as.h \
  164.     $(srcdir)/bignum.h \
  165.     $(srcdir)/expr.h \
  166.     $(srcdir)/flonum.h \
  167.     $(srcdir)/frags.h \
  168.     $(srcdir)/hash.h \
  169.     $(srcdir)/input-file.h \
  170.     $(srcdir)/listing.h \
  171.     $(srcdir)/tc.h \
  172.     $(srcdir)/obj.h \
  173.     $(srcdir)/read.h \
  174.     $(srcdir)/struc-symbol.h \
  175.     $(srcdir)/subsegs.h \
  176.     $(srcdir)/symbols.h \
  177.     $(srcdir)/write.h
  178.  
  179. LINKED_HEADERS = \
  180.     a.out.gnu.h \
  181.     a.out.h \
  182.     host.h \
  183.     targ-env.h \
  184.     targ-cpu.h \
  185.     obj-format.h \
  186.     atof-targ.h
  187.  
  188. HEADERS = $(LINKED_HEADERS) $(REAL_HEADERS)
  189.  
  190. OBJS = \
  191.     targ-cpu.o \
  192.     obj-format.o \
  193.     atof-targ.o \
  194.     app.o \
  195.     as.o \
  196.     atof-generic.o \
  197.     bignum-copy.o \
  198.     cond.o \
  199.     expr.o \
  200.     flonum-konst.o \
  201.     flonum-copy.o \
  202.     flonum-mult.o \
  203.     frags.o \
  204.     hash.o \
  205.     hex-value.o \
  206.     input-file.o \
  207.     input-scrub.o \
  208.     messages.o \
  209.     output-file.o \
  210.     read.o \
  211.     subsegs.o \
  212.     symbols.o \
  213.     write.o \
  214.     listing.o \
  215.     xmalloc.o
  216.  
  217. #### host, target, and site specific Makefile frags come in here.
  218.  
  219. all: as.new
  220.     @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) all)
  221.  
  222. dvi info:
  223.     @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) $@)
  224.  
  225. install-info:
  226.     @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) install-info)
  227.  
  228. clean-info:
  229.     @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean-info)
  230.  
  231. # Now figure out from those variables how to compile and link.
  232.  
  233. # This is the variable actually used when we compile.
  234. ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CROSS) $(CFLAGS) $(HDEFINES) $(TDEFINES) \
  235.     $(BFDDEF)
  236.  
  237. # How to link with both our special library facilities
  238. # and the system's installed libraries.
  239.  
  240. LIBS = ../opcodes/libopcodes.a $(BFDLIB) $(LOCAL_LOADLIBES) \
  241.     ../libiberty/libiberty.a
  242.  
  243. # Specify the directories to be searched for header files.
  244. # Both . and srcdir are used, in that order,
  245. # so that tm.h and config.h will be found in the compilation
  246. # subdirectory rather than in the source directory.
  247. INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config -I$(srcdir)/../include
  248. SUBDIR_INCLUDES = -I.. -I$(srcdir) -I$(srcdir)/config
  249.  
  250. # Always use -I$(srcdir)/config when compiling.
  251. .c.o:
  252.     $(CC) -c $(ALL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
  253.  
  254. # This tells GNU make version 3 not to export all the variables
  255. # defined in this file into the environment.
  256. .NOEXPORT:
  257.  
  258. # Files to be copied away after each stage in building.
  259. STAGESTUFF = *.o as.new
  260.  
  261. as.new: $(OBJS) $(LIBS)
  262.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o as.new $(OBJS) $(LIBS) $(LOADLIBES)
  263.  
  264. installcheck:
  265.     @echo No installcheck target is available yet for the GNU assembler.
  266.  
  267. check: as.new
  268.     @(here=`pwd` ; export here ; \
  269.       cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) $(CHECKFLAGS) check)
  270.  
  271. config.status:
  272.     @echo You must configure gas.  Look at the INSTALL file for details.
  273.     @false
  274.  
  275. config.h: config-stamp ; @true
  276. config-stamp: Makefile
  277.     -rm -f config.new config-stamp
  278.     echo '#define TARGET_CPU       "$(target_cpu)"'        > config.new
  279.     echo '#define TARGET_ALIAS     "$(target_alias)"'     >> config.new
  280.     echo '#define TARGET_CANONICAL "$(target_canonical)"' >> config.new
  281.     echo '#define GAS_VERSION      "$(VERSION)"'          >> config.new
  282.     $(srcdir)/../move-if-change config.new config.h
  283.     touch config-stamp
  284.  
  285. # Compiling object files from source files.
  286.  
  287. app.o : app.c as.h host.h targ-env.h obj-format.h \
  288.   targ-cpu.h struc-symbol.h \
  289.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h 
  290. as.o : as.c as.h host.h targ-env.h obj-format.h \
  291.   targ-cpu.h struc-symbol.h \
  292.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h subsegs.h \
  293.   tc.h obj.h config.h
  294. atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \
  295.   targ-cpu.h struc-symbol.h \
  296.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h 
  297. bignum-copy.o : bignum-copy.c as.h host.h \
  298.   targ-env.h obj-format.h \
  299.   targ-cpu.h struc-symbol.h \
  300.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h 
  301. cond.o : cond.c as.h host.h targ-env.h obj-format.h \
  302.   targ-cpu.h struc-symbol.h \
  303.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
  304.  
  305. debug.o : debug.c as.h host.h targ-env.h obj-format.h \
  306.   targ-cpu.h struc-symbol.h \
  307.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  308.   subsegs.h 
  309. expr.o : expr.c as.h host.h targ-env.h obj-format.h \
  310.   targ-cpu.h  struc-symbol.h \
  311.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
  312.  
  313. flonum-konst.o : flonum-konst.c flonum.h bignum.h 
  314. flonum-copy.o : flonum-copy.c as.h host.h targ-env.h obj-format.h \
  315.   targ-cpu.h  struc-symbol.h \
  316.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h 
  317. flonum-mult.o : flonum-mult.c flonum.h bignum.h 
  318. frags.o : frags.c as.h host.h targ-env.h obj-format.h \
  319.   targ-cpu.h  struc-symbol.h \
  320.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  321.   subsegs.h  
  322. hash.o : hash.c as.h host.h targ-env.h obj-format.h \
  323.   targ-cpu.h  struc-symbol.h \
  324.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h 
  325. hex-value.o : hex-value.c 
  326. input-file.o : input-file.c as.h host.h \
  327.    targ-env.h obj-format.h targ-cpu.h \
  328.    struc-symbol.h write.h flonum.h bignum.h expr.h \
  329.   frags.h hash.h read.h symbols.h tc.h obj.h input-file.h 
  330. input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \
  331.   as.h host.h targ-env.h obj-format.h \
  332.   targ-cpu.h  struc-symbol.h \
  333.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  334.   input-file.h 
  335. listing.o : listing.c as.h host.h targ-env.h flonum.h bignum.h \
  336.   listing.h obj-format.h targ-cpu.h struc-symbol.h write.h expr.h \
  337.   frags.h hash.h read.h symbols.h tc.h obj.h input-file.h
  338. messages.o : messages.c as.h host.h targ-env.h obj-format.h \
  339.   targ-cpu.h  struc-symbol.h \
  340.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
  341. output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \
  342.   targ-cpu.h  struc-symbol.h \
  343.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  344.   output-file.h 
  345. read.o : read.c as.h host.h targ-env.h obj-format.h \
  346.   targ-cpu.h  struc-symbol.h \
  347.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h
  348. subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \
  349.   targ-cpu.h  struc-symbol.h \
  350.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  351.   subsegs.h  
  352. symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \
  353.   targ-cpu.h  struc-symbol.h \
  354.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  355.    subsegs.h 
  356. write.o : write.c as.h host.h targ-env.h obj-format.h \
  357.   targ-cpu.h  struc-symbol.h \
  358.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \
  359.   subsegs.h  output-file.h 
  360. xmalloc.o : xmalloc.c
  361. atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \
  362.   targ-cpu.h struc-symbol.h \
  363.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
  364.   symbols.h tc.h obj.h 
  365. obj-format.o : obj-format.c as.h host.h targ-env.h obj-format.h \
  366.   targ-cpu.h struc-symbol.h \
  367.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
  368.   subsegs.h symbols.h tc.h obj.h  
  369. targ-cpu.o : targ-cpu.c config.h targ-env.h obj-format.h \
  370.   targ-cpu.h struc-symbol.h \
  371.   write.h flonum.h bignum.h expr.h frags.h hash.h read.h \
  372.   symbols.h tc.h obj.h $(TARG_CPU_DEPENDENTS)
  373.  
  374. # Remake the info files.
  375.  
  376. doc: $(srcdir)/as.info
  377.  
  378. $(srcdir)/as.info: $(srcdir)/doc/as.texinfo
  379.     @(cd doc; $(MAKE) $(FLAGS_TO_PASS) as.info; mv as.info $srcdir)    
  380.  
  381. clean:
  382.     @(cd doc ; $(MAKE) $(FLAGS_TO_PASS) clean)
  383.     @(cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) clean)
  384.     -rm -f $(STAGESTUFF) core
  385.  
  386. # Like clean but also delete the links made to configure gas.
  387. distclean: clean
  388.     -rm -f config.status Makefile host.h targ-env.h targ-cpu.h \
  389.         targ-cpu.c obj-format.h obj-format.c atof-targ.c TAGS
  390.  
  391. # Entry points `install', `includes' and `uninstall'.
  392.  
  393. # Copy the files into directories where they will be run.
  394. install:
  395.     -parent=`echo $(bindir)|sed -e 's@/[^/]*$$@@'`; \
  396.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  397.     -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
  398.     -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \
  399.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  400.     -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; fi
  401.     -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \
  402.     rm -f $(bindir)/$$n; \
  403.     $(INSTALL_PROGRAM) as.new $(bindir)/$$n; \
  404.     $(INSTALL_DATA) $(srcdir)/doc/as.1 $(man1dir)/$$n.1; \
  405.     if [ -d $(tooldir) ]; then \
  406.       if [ -d $(tooldir)/bin ] ; then true ; else mkdir $(tooldir)/bin ; fi; \
  407.       rm -f $(tooldir)/bin/as; \
  408.       ln $(bindir)/$$n $(tooldir)/bin/as \
  409.        || $(INSTALL_PROGRAM) as.new $(tooldir)/bin/as; \
  410.     else true; fi
  411.  
  412. # Cancel installation by deleting the installed files.
  413. uninstall:
  414.     -n=`t='$(program_transform_name)'; echo as | sed -e "" $$t`; \
  415.     rm -f $(bindir)/$$n; \
  416.     rm -f $(mandir)/$$n.1
  417.  
  418. # These exist for maintenance purposes.
  419.  
  420. tags TAGS: force
  421.     etags $(REAL_HEADERS) $(REAL_SOURCES) $(srcdir)/config/*.[hc] $(srcdir)/README $(srcdir)/Makefile.in
  422.     
  423. bootstrap: as.new force
  424.     $(MAKE) stage1
  425.     $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
  426.     $(MAKE) stage2
  427.     $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
  428.     $(MAKE) comparison against=stage2
  429.  
  430. bootstrap2: force
  431.     $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
  432.     $(MAKE) stage2
  433.     $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
  434.     $(MAKE) comparison against=stage2
  435.  
  436. bootstrap3: force
  437.     $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as.new
  438.     $(MAKE) comparison against=stage2
  439.  
  440. # Copy the object files from a particular stage into a subdirectory.
  441. stage1: force
  442.     -mkdir stage1
  443.     -mv $(STAGESTUFF) stage1
  444.     if [ -f stage1/as.new -a ! -f stage1/as ] ; then (cd stage1 ; ln -s as.new as) ; fi
  445.  
  446. stage2: force
  447.     -mkdir stage2
  448.     -mv $(STAGESTUFF) stage2
  449.     if [ -f stage2/as.new -a ! -f stage2/as ] ; then (cd stage2 ; ln -s as.new as) ; fi
  450.  
  451. stage3: force
  452.     -mkdir stage3
  453.     -mv $(STAGESTUFF) stage3
  454.     if [ -f stage3/as.new -a ! -f stage3/as ] ; then (cd stage3 ; ln -s as.new as) ; fi
  455.  
  456. against=stage2
  457.  
  458. comparison: force
  459.     for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
  460.  
  461. de-stage1: force
  462.     - (cd stage1 ; rm as ; mv -f * ..)
  463.     - rmdir stage1
  464.  
  465. de-stage2: force
  466.     - (cd stage2 ; rm as ; mv -f * ..)
  467.     - rmdir stage2
  468.  
  469. de-stage3: force
  470.     - (cd stage3 ; rm as ; mv -f * ..)
  471.     - rmdir stage3
  472.  
  473. #In GNU Make, ignore whether `stage*' exists.
  474. .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
  475.  
  476. force:
  477.  
  478. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
  479.         $(srcdir)/configure.in
  480.     $(SHELL) ./config.status
  481.